import Vue from 'vue'
import Router from 'vue-router'
import indexRouter from '@/pages/indexRouter'
import home from '@/pages/tabbar/home'
import cinema from '@/pages/tabbar/cinema'
import my from '@/pages/tabbar/my'
import movieDetail from '@/pages/movieDetail'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'indexRouter',
      component: indexRouter,
      redirect:'home',
      children:[
        {
          path:'home',
          component:home
        },
        {
          path:'cinema',
          component:cinema
        },
        {
          path:'my',
          component:my
        }
      ]
    },
    {
      path: '/movieDetail',
      name: 'movieDetail',
      component: movieDetail
    }
  ]
})
